﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ToolHelp
{
    public static class StringHelper
    {
        /// <summary>
        /// 判断字符串为空
        /// </summary>
        /// <param name="stringText"></param>
        /// <returns></returns>
        public static bool IsNull(this string stringText)
        {
            bool result = false;
            if (string.IsNullOrEmpty(stringText) || string.IsNullOrWhiteSpace(stringText))
            {
                result = true;
            }
            return result;  
        }
        /// <summary>
        /// 判断字符串不为空
        /// </summary>
        /// <param name="stringText"></param>
        /// <returns></returns>
        public static bool IsNotNull(this string stringText)
        {
            bool result = true;
            if (string.IsNullOrEmpty(stringText) || string.IsNullOrWhiteSpace(stringText))
            {
                result = false;
            }
            return result;
        }
    }
}
